package com.atguigu.tingshu.user.client;

import com.atguigu.tingshu.model.user.VipServiceConfig;
import com.atguigu.tingshu.user.service.VipServiceConfigService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Haoran Sun
 * @since 2024/08/27
 */

@RestController
@RequestMapping("client/user/vipServiceConfig")
public class VipServiceConfigClientController {

    @Resource
    private VipServiceConfigService vipServiceConfigService;


    /**
     * 根据vipId获取vip服务配置信息
     * @param vipId vipId
     * @return vip服务配置信息
     */
    @GetMapping("/getVipServiceConfig/{vipId}")
    VipServiceConfig getVipServiceConfig(@PathVariable("vipId") Long vipId){

        return vipServiceConfigService.getById(vipId);
    }


}
